import java.util.*;

/**
 *class responsible for storing visualization information abou
 * a mass
 * @author L. Grewe
 * @version 1.0
 **/
public class MassVis
{
        /**idicates ID of associated mass.  Masses stored in IPWindow.roi.Mass_Vector **/
	int Mass_ID = -1; 

	/** Store the VisIcon object, one for each feature in this Hashmap**/
	HashMap<String, VisIcon>  VisIcons = new HashMap<String, VisIcon>();

       
        /**constructor that takes a Mass object and from it fills in the
           class data fields of Mass_ID and the HashMap VisIcons
          **/
        MassVis(Mass m) {
          this.Mass_ID = m.getMassID();

	  //create *Icons for the VisIcons hashmap

	  //create AreaIcon associated with Mass.Area
          AreaIcon a = new AreaIcon(m);
          this.setAreaIcon(a);


	  //create GreyIcon associated with Mass.Icon
	  GreyIcon g = new GreyIcon(m);
          this.setGreyIcon(g);


	  //create ThinIcon associated with Mass.Icon
	  ThinIcon t = new ThinIcon(m);
          this.setThinIcon(t);

	  //create SharpIcon associated with Mass.Icon
	  SharpIcon s = new SharpIcon(m);
          this.setSharpIcon(s);

          System.out.println("MassVis: generated *Icon objects for this.VisIcons of size " + this.VisIcons.size());
 
          

        }
	

        


        /** method to set AreaIcon associated with key area in the VisIcon hash**/
        public void setAreaIcon(AreaIcon a_icon) {
            this.VisIcons.put("area", a_icon);

        }
 	
	/** method to get AreaIcon associated with key area in the VisIcon hash**/
        public AreaIcon getAreaIcon() {
            return (AreaIcon) this.VisIcons.get("area");

        }


	 /** method to set GreyIcon associated with key grey in the VisIcon hash**/
        public void setGreyIcon(GreyIcon a_icon) {
            this.VisIcons.put("grey", a_icon);

        }
 	
	/** method to get GreyIcon associated with key grey in the VisIcon hash**/
        public GreyIcon getGreyIcon() {
            return (GreyIcon) this.VisIcons.get("grey");

        }


        /** method to set ThinIcon associated with key thin in the VisIcon hash**/
        public void setThinIcon(ThinIcon a_icon) {
            this.VisIcons.put("thin", a_icon);

        }
 	
	/** method to get ThinIcon associated with key thin in the VisIcon hash**/
        public ThinIcon getThinIcon() {
            return (ThinIcon) this.VisIcons.get("thin");

        }



        /** method to set SharpIcon associated with key sharp in the VisIcon hash**/
        public void setSharpIcon(SharpIcon a_icon) {
            this.VisIcons.put("sharp", a_icon);

        }
 	
	/** method to get SharpIcon associated with key sharp in the VisIcon hash**/
        public SharpIcon getSharpIcon() {
            return (SharpIcon) this.VisIcons.get("sharp");

        }

}
